import request from '@/utils/request'

// 查询国家机构列表
export function listNation(query) {
  return request({
    url: '/system/nation/lists',
    method: 'get',
    params: query
  })
}
export function listVisit(query) {
  return request({
    url: '/system/nation/listVisit',
    method: 'get',
    params: query
  })
}

export function selectVisit(query) {
  return request({
    url: '/system/nation/' + query,
    method: 'get'
  })
}

export function listPre(query) {
  return request({
    url: '/system/nation/listPre',
    method: 'get',
    params: query
  })
}

// 查询国家机构详细
export function getNation(uniqueCode) {
  return request({
    url: '/system/nation/getinfo?registerNumber='+uniqueCode,
    method: 'get'
  })
}

// 新增国家机构
export function addNation(data) {
  return request({
    url: '/system/nation',
    method: 'post',
    data: data
  })
}

// 修改国家机构
export function updateNation(data) {
  return request({
    url: '/system/nation',
    method: 'put',
    data: data
  })
}

// 删除国家机构
export function delNation(uniqueCode) {
  return request({
    url: '/system/nation/' + uniqueCode,
    method: 'delete'
  })
}

// 导出国家机构
export function exportNation(query) {
  return request({
    url: '/system/nation/export',
    method: 'get',
    params: query
  })
}
